{template '_header_base'}

<body class="white-bg" style="text-align:center">
<div id='topbar' class='top-navigation   gray-bg '>
    <nav class="navbar   gray-bg " role="navigation" style="width:1024px;margin:auto;">
        <div class="navbar-header" style="width:200px;">
            <button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
                <i class="fa fa-reorder"></i>
            </button>
            {if !empty($copyright) && !empty($copyright['logo'])}
            <a style='padding:0;overflow:hidden;'><img src="{php echo tomedia($copyright['logo'])}" style='width:150px;height:50px;' /></a>
            {else}
            <a class="navbar-brand" href="{php echo merchUrl()}">LOGO</a>
            {/if}
        </div>

<style>

    .deg180{
        transform:rotate(180deg);
        -ms-transform:rotate(180deg); 	/* IE 9 */
        -moz-transform:rotate(180deg); 	/* Firefox */
        -webkit-transform:rotate(180deg); /* Safari 和 Chrome */
        -o-transform:rotate(180deg); 	/* Opera */
    }
</style>
<div class="navbar-collapse collapse" id="navbar" style="text-align:center">

    <ul class="nav navbar-nav gray-bg">

        <li {if $_W['routes']=='shop'} class="active"{/if}><a href="{php echo merchUrl('shop')}">店铺</a></li>
        {ifp 'goods'}<li {if $_W['routes']=='goods'} class="active"{/if}><a href="{php echo merchUrl('goods')}">商品</a></li>{/if}
        {ifp 'order'}<li {if $_W['routes']=='order'} class="active"{/if}><a href="{php echo merchUrl('order')}">订单</a></li>{/if}
        {ifp 'sale'}<li {if $_W['routes']=='sale'} class="active"{/if}><a href="{php echo merchUrl('sale')}">营销</a></li>{/if}
        {ifp 'statistics'}<li {if $_W['routes']=='statistics'} class="active"{/if}><a href="{php echo merchUrl('statistics')}">数据</a></li>{/if}
        {if $_W['merchisfounder'] ==1}
        <li {if $_W['routes']=='perm'} class="active"{/if}><a href="{php echo merchUrl('perm')}">{if !empty($_W['accounttotal'])}权限{else}查看日志{/if}</a></li>
        {/if}
        {ifp 'sysset'}<li {if $_W['routes']=='sysset'} class="active"{/if}><a href="{php echo merchUrl('sysset')}">设置</a></li>{/if}
        {ifp 'apply'}<li {if $_W['routes']=='apply'} class="active"{/if}><a href="{php echo merchUrl('apply')}">结算</a></li>{/if}

        <li {if $_W['routes']=='plugins'} class="active"{/if}><a href="{php echo merchUrl('plugins')}">应用</a></li>

    </ul>

    <ul class="nav navbar-top-links navbar-right">
        <li class="dropdown">
            <a aria-expanded="false" role="button" href="#" class="dropdown-toggle" data-toggle="dropdown" style="position:relative;" onclick="$(this).find('span').toggleClass('deg180')">
                <name style="width: 80px;white-space:nowrap;overflow:hidden;text-overflow: ellipsis;display: block;text-align: center">{$_W['merch_username']}//{$_W['uniaccount']['username']}</name>
                <span class="caret" style="position: absolute;top: 22px;right: 12px;"></span></a>
            <ul role="menu" class="dropdown-menu">
                <li><a href="{php echo merchUrl('updatepassword')}"><i class="icon icon-keyboard"></i>  修改密码</a></li>
                <li><a href="{php echo merchUrl('quit')}"><i class="icon icon-back"></i>  退出</a></li>
            </ul>
        </li>
    </ul>
</div>
</nav>
</div>
<div class='wrapper main-wrapper wrapper-content '>
    {if $no_left}
    <div class="page-content" style="width:1000px">
        {else}
        <div class="page-menubar">
            {php echo $this->manageMenus()}
        </div>
        <div class="page-content">
            {/if}
